package com.carkeeper.service.serviceFallback;

import com.carkeeper.dto.EmployeeDTO;
import com.carkeeper.service.EmployeeFeign;
import com.carkeeper.vo.Pager;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author ：zwk
 * @date ：Created in 2020/6/1
 * @description ：
 * @version: 1.0
 */
@Component
public class EmployeeFallbackFactory implements FallbackFactory<EmployeeFeign> {
    @Override
    public EmployeeFeign create(Throwable throwable) {
        return new EmployeeFeign() {
            @Override
            public Pager<EmployeeDTO>
            queryPage(Long pageSize, Long page, Long id, String username,
                      String name, String phone, Long departmentId, Integer accountStatus) {
                return null;
            }

            @Override
            public List<EmployeeDTO> getUserListByIds(List<Long> ids) {
                return null;
            }
        };
    }
}
